package com.platform.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.PostsDao;
import com.platform.entity.PostsEntity;
import com.platform.service.PostsService;

/**
 * 春芽社区故事Service实现类
 *
 * @author czj
 * @email 729618941@qq.com
 * @date 2018-11-03 11:24:17
 */
@Service("postsService")
public class PostsServiceImpl implements PostsService {
    @Autowired
    private PostsDao postsDao;

    @Override
    public PostsEntity queryObject(Integer id) {
        return postsDao.queryObject(id);
    }

    @Override
    public List<PostsEntity> queryList(Map<String, Object> map) {
        return postsDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return postsDao.queryTotal(map);
    }

    @Override
    public int save(PostsEntity posts) {
        return postsDao.save(posts);
    }

    @Override
    public int update(PostsEntity posts) {
        return postsDao.update(posts);
    }

    @Override
    public int delete(Integer id) {
        return postsDao.delete(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return postsDao.deleteBatch(ids);
    }

    @Override
    public void updateTopPosts() {
        postsDao.updateTopPosts();
    }


}
